const initvalue = {
  token: '',
  refresh_token: '',
}

export const login = (state = initvalue, action) => {
  const { type, payload } = action
  if (type === 'login-token') {
    return payload
  }
  if (type === 'login/logout') {
    return {}
  }
  return state
}
